#ifndef OCK_MEMORY_BRIDGE_OCK_ADAPTER_OCK_MEMORY_GUARD_H
#define OCK_MEMORY_BRIDGE_OCK_ADAPTER_OCK_MEMORY_GUARD_H
#include <memory>
#include "ock/hmm/mgr/OckHmmMemoryPool.h"
#include "ock/acladapter/executor/OckAsyncTaskExecuteService.h"
namespace ock {
namespace acladapter {

class OckAdapterMemoryGuard : public hmm::OckHmmMemoryGuard
{
public:
    virtual ~OckAdapterMemoryGuard() noexcept = default;
    virtual uint8_t *ReleaseGuard(void) = 0;
    virtual uint8_t *GetAddr(void) = 0;
    static std::shared_ptr<OckAdapterMemoryGuard> Create(OckAsyncTaskExecuteService &service, uint8_t *guardAddr,
        uint64_t byteSize, hmm::OckHmmHeteroMemoryLocation location);


    explicit OckAsyncResultInnerBridge(void);
    void SetResult(std::shared_ptr<_ResultT> result);
    bool IsRunComplete(void) const;
    static aclError GetDeviceCount(uint32_t *count);
    static aclError GetMemInfo(aclrtMemAttr attr, size_t *free, size_t *total);
};
std::ostream &operator<<(std::ostream &os, const OckAdapterMemoryGuard &data);
}
}
#endif